package com.dalanmao.activity;

import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import android.widget.ImageView;

import com.dalanmao.utils.BitmapUitl;
import com.dalanmao.utils.R;

public class MainActivity extends Activity {
	
	private ImageView mImageView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		Log.e("zl", "路径1："+Environment.getExternalStoragePublicDirectory("zl").getAbsolutePath());
		
		Log.e("zl", "路径2："+Environment.getExternalStorageDirectory().getAbsolutePath());
		
		mImageView = (ImageView) findViewById(R.id.mImageView);
		
		//按指定的大小缩放后，显示图片
		mImageView.setImageBitmap( BitmapUitl.decodeSampledBitmapFromResource(
				getResources(), R.drawable.demo, 400, 400) );
		
	}

	

	

}
